<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>[%$softtitle%]</title>
<link href="templates/css/baselist.css" rel="stylesheet" type="text/css" />
<link href="templates/css/all.css" rel="stylesheet" type="text/css" />
<link href="templates/css/clickmenu.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/control.js"></script>
<script type="text/javascript" src="js/form.js"></script>
<script type="text/javascript" src="js/cityselect.js"></script>
<script type="text/javascript">
	var shoubound = true;  //是否显示之前的日期，true显示，false不显
	var resizewindow= null;
/**
	window.onresize = function(){
		var h = $(window).height();
		if(resizewindow!=h){
			sizewindow();
			resizewindow=h;
		}
	}

	function sizewindow(){
		var h = $(window).height();
		if(document.getElementById("mainbodyauto")){
			$('.manageadd').css({height:h-40});
			$('.manageedit').css({height:h-40});
		}
	}
	**/
	var ordermain_js_hotelname_empty = "[%$ST.ordermain_js_hotelname_empty%]";
	var ordermain_js_roomtype_empty = "[%$ST.ordermain_js_roomtype_empty%]";
	var ordermain_js_checkindate_empty = "[%$ST.ordermain_js_checkindate_empty%]";
	var ordermain_js_checkoutdate_empty = "[%$ST.ordermain_js_checkoutdate_empty%]";
	var ordermain_js_roomamount_empty = "[%$ST.ordermain_js_roomamount_empty%]";
	
	var ordermain_js_guestname_empty = "[%$ST.ordermain_js_guestname_empty%]";
	var ordermain_js_contactername_empty = "[%$ST.ordermain_js_contactername_empty%]";
	var ordermain_js_contacterphone_empty = "[%$ST.ordermain_js_contacterphone_empty%]";
	var ordermain_js_arrivallatetime_empty = "[%$ST.ordermain_js_arrivallatetime_empty%]";
	var ordermain_js_changemembers_tips ="[%$ST.ordermain_js_changemembers_tips%]";
	var ordermain_js_orderupnote_tips = "[%$ST.ordermain_js_orderupnote_tips%]";
	var ordermain_js_orderupnote2_tips = "[%$ST.ordermain_js_orderupnote2_tips%]";
	
	var ordermain_js_edit_ok = "[%$ST.ordermain_js_edit_ok%]";
	var ordermain_js_edit_no = "[%$ST.ordermain_js_edit_no%]";
	
	var ordermain_js_num_err = "[%$ST.ordermain_js_num_err%]";  //金额错误
	var ordermain_js_orderamount_empty = "[%$ST.ordermain_js_orderamount_empty%]"; //订单金额错误
	
	var ordermain_js_param_err = "[%$ST.ordermain_js_param_err%]";
	var iframename = "[%$iframename%]";
	$(document).ready(function(){
		var h = '[%$iframeheightwindow%]';
		//$('.manageadd').css({height:h-40});
		[%if $power_136250==true%]
		$('#hotelmembers').change(function() {
			document.orderedit.noteoforder.focus();
			alert(ordermain_js_changemembers_tips);
    	});
		[%/if%]
		[%if $power_139163==true || ($power_139251==true && $admin_userid==$read.HotelMembers) %]
			$('#orderstate').change(function() {
				var old_orderstate = $('#orderstate_log').val();
				var curr_orderstate = $('#orderstate').val();
				if(curr_orderstate < old_orderstate) {
					document.orderedit.orderupnote.focus();
					var ordertips = ordermain_js_orderupnote_tips.replace("{#old#}",get_orderstatus(parseInt(old_orderstate)));
					ordertips = ordertips.replace('{#new#}',get_orderstatus(parseInt(curr_orderstate)));
					alert(ordertips);
				}
			});
		[%/if%]
		$('#guestname').blur(function() {
			var gname = $('#guestname').val();
			if(gname != '' && gname.indexOf('/')>0) {
				$('#guestamount').val(gname.split('/').length);
			} else {
				$('#guestamount').val('1')
			}
		});
		$('#roomamount,#checkindate,#checkoutdate').change(function() {
			var days = getminusdate($("#checkindate").val(),$("#checkoutdate").val());
			var price = parseInt($("#roomprice").val());
			var room = parseInt($('#roomamount').val());
			$("#totalprice").val(days*price*room);
		});
		var options = {
			beforeSubmit: formverify,
			success:saveResponse
		}
		$('#orderedit').submit(function() {
			$(this).ajaxSubmit(options);
			return false;
		});
	})
	
	function get_orderstatus(statusid) {
		switch (statusid) {
			case 0:
				ordertypename = "[%$ST.ordermain_text_ordertype0%]";
				break;
			case 1:
				ordertypename = "[%$ST.ordermain_text_ordertype1%]";
				break;
			case 2:
				ordertypename = "[%$ST.ordermain_text_ordertype2%]";
				break;
			case 3:
				ordertypename = "[%$ST.ordermain_text_ordertype3%]";
				break;
			case 4:
				ordertypename = "[%$ST.ordermain_text_ordertype4%]";
				break;
			case 5:
				ordertypename = "[%$ST.ordermain_text_ordertype5%]";
				break;
			case 6:
				ordertypename = "[%$ST.ordermain_text_ordertype6%]";
				break;
			case 7:
				ordertypename = "[%$ST.ordermain_text_ordertype7%]";
				break;
			case 8:
				ordertypename = "[%$ST.ordermain_text_ordertype8%]";
				break;
			case 9:
				ordertypename = "[%$ST.ordermain_text_ordertype9%]";
				break;
			case 10:
				ordertypename = "[%$ST.ordermain_text_ordertype10%]";
				break;
			case 11:
				ordertypename = "[%$ST.ordermain_text_ordertype11%]";
				break;
		}
		return ordertypename;
	}

	function formverify(formData) {
		var queryString = $.param(formData);
		var get=urlarray(queryString);
		[%if $power_139163==true || ($power_139251==true && $admin_userid==$read.HotelMembers) %]
			if(get['orderstate'] < get['orderstate_log']) {
				if(get['orderupnote']=='') {
					document.orderedit.orderupnote.focus();
					alert(ordermain_js_orderupnote2_tips);
					return false;
				}
			}
		[%/if%]
		[%if $power_136250==true %]
			if(get['hotelmembers'] != get['hotelmembers_log']) {
				if(get['noteoforder'] == '') {
					document.orderedit.noteoforder.focus();
					alert("修改订单所属预订员，请填写备注");
					return false;
				}
			}
		[%/if%]
		if(get['hotelname']=='') {
			document.orderedit.hotelname.focus();
			alert(ordermain_js_hotelname_empty);
			return false;
		}
		if(get['checkindate'] != '' && get['checkoutdate'] != '') {
			var d = gethasdate(get['checkindate'],get['checkoutdate']);
			if(d > 0) {
				document.orderedit.checkindate.focus();
				alert("日期选择错误，入住日期不能大于离开日期！");
				return false;
			}
		}
		if(get['roomtype']=='') {
			document.orderedit.roomtype.focus();
			alert(ordermain_js_roomtype_empty);
			return false;
		}
		if(get['roomamount'].match(/^[0-9.]+$/ig)==null) {
			document.orderedit.roomamount.focus();
			alert(ordermain_js_roomamount_empty);
			return false;
		}
		if(get['guestname']=='') {
			document.orderedit.guestname.focus();
			alert(ordermain_js_guestname_empty);
			return false;
		}
		if(get['contactername']=='') {
			document.orderedit.contactername.focus();
			alert(ordermain_js_contactername_empty);
			return false;
		} 
		if(get['contactertel']=='' && get['contacterphone']=='') {
			document.orderedit.tel.focus();
			alert(ordermain_js_contacterphone_empty);
			return false;
		}
		if(get['checkindate']=='') {
			document.orderedit.checkindate.focus();
			alert(ordermain_js_checkindate_empty);
			return false;
		}
		if(get['checkoutdate']=='') {
			document.orderedit.checkoutdate.focus();
			alert(ordermain_js_checkoutdate_empty);
			return false;
		}
		if(get['arrivallatetime']=='') {
			document.orderedit.arrivallatetime.focus();
			alert(ordermain_js_arrivallatetime_empty);
			return false;
		}
		if(get['totalprice'].match(/^[0-9.]+$/ig)==null) {
			document.orderedit.totalprice.focus();
			alert(ordermain_js_orderamount_empty);
			return false;
		}
		parent.windowsdig('Loading','iframe:index.php?archive=management&action=load','400px','180px','iframe',false);
	}
	function saveResponse(options){
		parent.closeifram();
		if (options=='true'){
			parent.frames[iframename].refresh('selectform','selectall','check_all');
			alert(ordermain_js_edit_ok);
		} else if(options=='-1') {
			alert("对不起，参数错误，请重新提交");
		} else if(options=='-2') {
			alert("权限不够，请与管理员联系");
		} else {
			alert(ordermain_js_edit_no);
		}
		parent.onaletdoc()
	}
	$(function() {
		sec_cityone(1,[%$read.HotelinProvince%]);
		sec_citytwo([%$read.HotelinProvince%],[%$read.HotelinCity%]);
		sec_district([%$read.HotelinCity%],[%$read.HotelinArea%]);
		gDate("checkindate","checkoutdate");_g('img_checkindate').onclick=_g('checkindate').onclick;
		gDate("checkoutdate");_g('img_checkoutdate').onclick=_g('checkoutdate').onclick;
	})
</script>
<script type="text/javascript" src="/js/calendar.js"></script>
</head>

<body class="bodyflow">
<div class="centerrightwindow">
<form name="orderedit" id="orderedit" method="post" action="index.php?archive=ordermain&action=save">
	<input type="hidden" name="inputclass" value="edit">
    <input type="hidden" name="IsIntegral" value="[%$read.IsIntegral%]">
	<div id="mainbodyauto" class="manageadd">
		<div class="maindobycontent">
			<!--查看已选择的类型-->
			<div class="suggestion">
				<span class="sugicon"><span class="strong colorgorning2">[%$ST.position_title%]</span><span class="colorgorningage">[%$ST.ordermain_edit_mess%] <u>[%$read.HotelOrderID%]</u> [%$ST.ordermain_edit_mess2%] <u>[%$read.OrderDatetime%]</u> </span></span>
			</div>
<div class="sugtitle">
				<span class="sugtitleicon"><span class="strong colorgorning2">[%$ST.ordermain_text_orderbasic%]</span></span>
		  </div>
			<div class="sugtitle-line"></div>
			<div class="formdiv">
				<table border="0" width="100%">
					<tr class="trstyle2">
						<td width="15%" class="trtitle01">[%$ST.payreceiptlist_text_ordersn%]</td>
						<td width="6%" class="trtitle02"><span class="colorgblue">[%$read.HotelOrderID%]</span><input type="hidden" id="hotelorderid" name="hotelorderid" value="[%$read.HotelOrderID%]" /></td>
						<td width="6%" id="right" class="padding-left3">[%$ST.ordermain_edit_mess2%]</td>
						<td width="12%" class="trtitle02"><input type="text" id="orderdatetime" name="orderdatetime" value="[%$read.OrderDatetime%]" size="18"  class="infoInput" /></td>
                        <td width="6%" id="right" class="padding-left3">[%$ST.ordermain_text_hotelmembersname2%]</td>
						<td width="9%" class="trtitle02">
                        [%if $power_136250==true %]
                        <select size="1" name="hotelmembers" class="select" id="hotelmembers">
							<option value="0">[%$ST.ordermain_text_selecttext%]</option>
                            [%forlist from=$memarray key=ii%]
                            <option [%if $memarray[ii].selected=='selected'%]selected="selected" [%/if%]value="[%$memarray[ii].id%]">[%$memarray[ii].name%]</option>
                            [%/forlist%]
						</select>
                        <input type="hidden" id="hotelmembers_log" name="hotelmembers_log" value="[%$read.HotelMembers%]">
                        [%else%]
						<span class="colorgblue">[%$read.HotelMembersValue%]</span><input type="hidden" id="hotelmembers" name="hotelmembers" value="[%$read.HotelMembers%]">
                        [%/if%]</td>
						<td width="46%" class="trtitle02"><span class="cautiontitle">修改订单所属预订员，请填写备注，只有组长或者管理员才有该权限</span></td>
					</tr>
					<tr class="trstyle2">
						<td width="15%" class="trtitle01">[%$ST.ordermain_text_ydype%]</td>
						<td width="6%" class="trtitle02"><select size="1" name="ordertype" class="select" id="ordertype">
                        <option [%if $read.OrderType==1%]selected="selected" [%/if%]value="1">[%$ST.ordermain_text_webyding%]</option>
                        <option [%if $read.OrderType==2%]selected="selected" [%/if%]value="2">[%$ST.ordermain_text_ordertype10%]</option>
                        </select>
                        </td>
						<td width="6%"  id="right" class="padding-left3">[%$ST.enquirymain_add_userid2%]</td>
						<td width="12%" class="trtitle02"><input type="text" id="userid" name="userid" size="15" value="[%$read.UserId%]" class="infoInput" /></td>
                        <td width="6%"  id="right" class="padding-left3">[%$ST.ordermain_add_paytype%]</td>
						<td width="9%" class="trtitle02">
                        <select size="1" name="paymenttypecode" class="select" id="paymenttypecode">
                        <option [%if $read.PaymentTypeCode==0%]selected="selected" [%/if%]value="0">[%$ST.ordermain_edit_paytype%]</option>
                        <option [%if $read.PaymentTypeCode==1%]selected="selected" [%/if%]value="1">[%$ST.ordermain_edit_paytype2%]</option>
                        </select>
                        </td>
						<td width="46%" class="trtitle02"></td>
					</tr>
                    <tr class="trstyle2">
						<td width="15%" class="trtitle01">[%$ST.ordermain_text_checkindate%]</td>
						<td width="12%" colspan="2" class="trtitle02"><input id="checkindate" type="text" name="checkindate" size="15" value="[%$read.CheckInDate%]" class="infoInput" /> <img style="cursor:pointer;" src="/images/calendar.gif" id="img_checkindate" width="16" height="19" align="absmiddle" /></td>
						<td width="12%" id="right" class="padding-left3">[%$ST.ordermain_text_checkoutdate%]</td>
						<td width="61%" colspan="3" class="trtitle02"><input id="checkoutdate" type="text" name="checkoutdate" size="15" value="[%$read.CheckOutDate%]" class="infoInput" /> <img style="cursor:pointer;" src="/images/calendar.gif" id="img_checkoutdate" width="16" height="19" align="absmiddle" />　　<span class="cautiontitle">改变日期或者改变房间数总价会自动计算</span></td>
					</tr>
					<tr class="trstyle2">
						<td width="15%" class="trtitle01">[%$ST.ordermain_add_content2%]</td>
						<td width="85%" colspan="6" class="trtitle02"><textarea name="noteofguest" id="noteofguest" rows="3" cols="60" class="infoInput">[%$read.NoteofGuest%]</textarea><span class="cautiontitle">客户在前台下订单时候填写的备注</span></td>
					</tr>

					<tr class="trstyle2">
						<td width="15%" class="trtitle01">[%$ST.ordermain_add_content3%]</td>
						<td width="85%" colspan="6" class="trtitle02"><textarea name="noteoforder" id="noteoforder" rows="3" cols="60" class="infoInput">[%$read.NoteofOrder%]</textarea><span class="cautiontitle">预订员或者组长管理员所填写的备注</span></td>
					</tr>
				</table>
	    </div>
            <div class="sugtitle">
				<span class="sugtitleicon"><span class="strong colorgorning2">[%$ST.ordermain_text_orderset%]</span></span>
			</div>
			<div class="sugtitle-line"></div>
			<div class="formdiv">
            	<table border="0" width="100%">
					<tr class="trstyle2">
						<td width="15%" class="trtitle01">[%$ST.ordermain_text_curstatus%]</td>
						<td width="6%" class="trtitle02"><span class="colorred">[%$read.OrderStateText%]</span></td>
						<td width="6%" id="right" class="padding-left3">[%$ST.ordermain_text_upstatus%]</td>
						<td width="12%" class="trtitle02">
                        [%if $read.OrderState==1%]
                        <select size="1" name="orderstate" id="orderstate">
                        	<option [%if $read.OrderState==0%]selected [%/if%]value="0">[%$ST.ordermain_text_ordertype0%]</option>
							<option [%if $read.OrderState==1%]selected [%/if%]value="1">[%$ST.ordermain_text_ordertype1%]</option>
                            <option [%if $read.OrderState==2%]selected [%/if%]value="2">[%$ST.ordermain_text_ordertype2%]</option>
                            <option [%if $read.OrderState==3%]selected [%/if%]value="3">[%$ST.ordermain_text_ordertype3%]</option>
                            <option [%if $read.OrderState==4%]selected [%/if%]value="4">[%$ST.ordermain_text_ordertype4%]</option>
                            <option [%if $read.OrderState==5%]selected [%/if%]value="5">[%$ST.ordermain_text_ordertype5%]</option>
                            <option [%if $read.OrderState==6%]selected [%/if%]value="6">[%$ST.ordermain_text_ordertype6%]</option>
                            <option [%if $read.OrderState==7%]sel ected [%/if%]value="7">[%$ST.ordermain_text_ordertype7%]</option>
                            <option [%if $read.OrderState==8%]selected [%/if%]value="8">[%$ST.ordermain_text_ordertype8%]</option>
                            <option [%if $read.OrderState==9%]selected [%/if%]value="9">[%$ST.ordermain_text_ordertype9%]</option>
                            <option [%if $read.OrderState==10%]selected [%/if%]value="10">[%$ST.ordermain_text_ordertype10%]</option>
                            <option [%if $read.OrderState==11%]selected [%/if%]value="11">[%$ST.ordermain_text_ordertype11%]</option>
						</select>
                        [%else%]
                        	[%if $power_139163==true || ($power_139251==true && $admin_userid==$read.HotelMembers) %]
                            <select size="1" name="orderstate" id="orderstate">
                            	<option [%if $read.OrderState==0%]selected [%/if%]value="0">[%$ST.ordermain_text_ordertype0%]</option>
                                <option [%if $read.OrderState==1%]selected [%/if%]value="1">[%$ST.ordermain_text_ordertype1%]</option>
                                <option [%if $read.OrderState==2%]selected [%/if%]value="2">[%$ST.ordermain_text_ordertype2%]</option>
                                <option [%if $read.OrderState==3%]selected [%/if%]value="3">[%$ST.ordermain_text_ordertype3%]</option>
                                <option [%if $read.OrderState==4%]selected [%/if%]value="4">[%$ST.ordermain_text_ordertype4%]</option>
                                <option [%if $read.OrderState==5%]selected [%/if%]value="5">[%$ST.ordermain_text_ordertype5%]</option>
                                <option [%if $read.OrderState==6%]selected [%/if%]value="6">[%$ST.ordermain_text_ordertype6%]</option>
                                <option [%if $read.OrderState==7%]selected [%/if%]value="7">[%$ST.ordermain_text_ordertype7%]</option>
                                <option [%if $read.OrderState==8%]selected [%/if%]value="8">[%$ST.ordermain_text_ordertype8%]</option>
                                <option [%if $read.OrderState==9%]selected [%/if%]value="9">[%$ST.ordermain_text_ordertype9%]</option>
                                <option [%if $read.OrderState==10%]selected [%/if%]value="10">[%$ST.ordermain_text_ordertype10%]</option>
                                <option [%if $read.OrderState==11%]selected [%/if%]value="11">[%$ST.ordermain_text_ordertype11%]</option>
                            </select>
                            [%else%]
                            <input type="hidden" name="orderstate" id="orderstate" value="[%$read.OrderState%]"><span class="colorred">[%$ST.ordermain_text_noupdatestatus%]</span>
                            [%/if%]
                        [%/if%]
                        <input type="hidden" name="orderstate_log" id="orderstate_log" value="[%$read.OrderState%]">
                        </td>
						<td width="61%" colspan="3" class="trtitle02"><span class="cautiontitle">一般预订员只能修改自己的订单，状态反向操作必须填写备注</span></td>
					</tr>
					<tr class="trstyle2">
						<td width="15%" class="trtitle01">[%$ST.ordermain_add_content%]</td>
						<td width="6%" colspan="6" class="trtitle02"><textarea name="orderupnote" id="orderupnote" rows="3" cols="60" class="infoInput">[%$read.OrderUpNote%]</textarea></td>
					</tr>
					<tr class="trstyle2">
						<td width="15%" class="trtitle01">[%$ST.ordermain_text_membertext%]</td>
						<td width="6%" class="trtitle02"><span class="colorgblue">[%$read.HotelMembersValue%]</span></td>
						<td width="6%"  id="right" class="padding-left3">[%$ST.loglist_text_time%]</td>
						<td width="12%" class="trtitle02"><span class="colorgblue">[%$read.OrderUpTime%]</span></td>
                        <td width="6%" class="trtitle02"></td>
						<td width="9%" class="trtitle02"></td>
						<td width="46%" class="trtitle02"></td>
					</tr>
				</table>
            </div>
            <div class="sugtitle">
				<span class="sugtitleicon"><span class="strong colorgorning2">[%$ST.ordermain_text_checkinfo%]</span></span>
		  </div>
			<div class="sugtitle-line"></div>
			<div class="formdiv">
            	<table border="0" width="100%">
	  <tr class="trstyle2">
						<td width="15%" class="trtitle01">[%$ST.ordermain_text_checkinname%]</td>
						<td width="17%" class="trtitle02"><input type="text" id="guestname" name="guestname" value="[%$guest.Name%]" size="35" class="infoInput" /></td>
						<td width="11%" id="right" class="padding-left3">[%$ST.enquirymain_add_sex%]</td>
						<td width="12%" class="trtitle02"><select class="infoInput" id="gendercode" name="gendercode">
<option [%if $guest.GenderCode==0%]selected [%/if%]value="0">[%$ST.select_sex_1%]</option> 
<option [%if $guest.GenderCode==1%]selected [%/if%]value="1">[%$ST.select_sex_0%]</option> 
<option [%if $guest.GenderCode==2 || $guest.GenderCode == ''%]selected [%/if%]value="2">[%$ST.select_sex_no%]</option> 
</select>
                        </td>
                        <td width="45%" class="trtitle02"><span class="cautiontitle">多个入住人请用‘/’隔开，如‘张三/李四’</span>
</td>
					</tr>
                    <tr class="trstyle2">
						<td width="15%" class="trtitle01">[%$ST.enquirymain_add_tel%]</td>
						<td width="17%" class="trtitle02"><input type="text" id="guesttel" name="guesttel" value="[%$guest.Phone%]" size="18" class="infoInput" /></td>
						<td width="11%"  id="right" class="padding-left3">[%$ST.enquirymain_add_motel%]</td>
						<td width="12%" class="trtitle02"><input type="text" id="guestphone" name="guestphone" value="[%$guest.Mobile%]" size="18" class="infoInput" /></td>
                        <td width="45%" class="trtitle02"></td>
					</tr>
					<tr class="trstyle2">
						<td width="15%" class="trtitle01">[%$ST.enquirymain_add_fax%]</td>
						<td width="17%" class="trtitle02"><input type="text" id="guestfax" name="guestfax" value="[%$guest.Fax%]" size="18" class="infoInput" /></td>
						<td width="11%"  id="right" class="padding-left3">[%$ST.enquirymain_add_email%]</td>
						<td width="12%" class="trtitle02"><input type="text" id="guestmail" name="guestmail" value="[%$guest.Email%]" size="18" class="infoInput" /></td>
                        <td width="45%" class="trtitle02"></td>
					</tr>
                    <tr class="trstyle2">
						<td width="15%" class="trtitle01">[%$ST.ordermain_text_idtypecode%]</td>
						<td width="17%" class="trtitle02"><input type="text" id="guestidtypecode" name="guestidtypecode" value="[%$guest.IdTypeCode%]" size="10" class="infoInput" /></td>
						<td width="11%"  id="right" class="padding-left3">[%$ST.ordermain_text_idnumber%]</td>
						<td width="12%" class="trtitle02"><input type="text" id="guestidnumber" name="guestidnumber" value="[%$guest.IdNumber%]" size="25" class="infoInput" /></td>
                        <td width="45%" class="trtitle02"></td>
					</tr>
                    <tr class="trstyle2">
						<td width="15%" class="trtitle01">[%$ST.ordermain_text_nationality%]</td>
						<td width="17%" class="trtitle02"><input type="text" id="guestnationality" name="guestnationality" value="[%$guest.Nationality%]" size="18" class="infoInput" /></td>
						<td width="11%"  class="trtitle02"></td>
						<td width="12%" class="trtitle02"></td>
                        <td width="45%" class="trtitle02"></td>
					</tr>
			  </table>
            </div>
            <div class="sugtitle">
				<span class="sugtitleicon"><span class="strong colorgorning2">[%$ST.ordermain_text_contactinfo%]</span></span>
			</div>
			<div class="sugtitle-line"></div>
			<div class="formdiv">
            	<table border="0" width="100%">
					<tr class="trstyle2">
						<td width="15%" class="trtitle01">[%$ST.enquirymain_edit_alias%]</td>
						<td width="17%" class="trtitle02"><input type="text" id="contactername" name="contactername" value="[%$contacter.Name%]" size="30" class="infoInput" /></td>
						<td width="11%" id="right" class="padding-left3">[%$ST.enquirymain_add_sex%]</td>
						<td width="12%" class="trtitle02"><select class="infoInput" id="congendercode" name="congendercode">
<option [%if $contacter[i].GenderCode==0%]selected [%/if%]value="0">[%$ST.select_sex_1%]</option> 
<option [%if $contacter[i].GenderCode==1%]selected [%/if%]value="1">[%$ST.select_sex_0%]</option> 
<option [%if $contacter[i].GenderCode==2 || $contacter[i].GenderCode == ''%]selected [%/if%]value="2">[%$ST.select_sex_no%]</option> 
</select></td>
                        <td width="45%" class="trtitle02"><span class="cautiontitle">多个联系人请用‘/’隔开，如‘张三/李四’</span></td>
					</tr>
                    <tr class="trstyle2">
						<td width="15%" class="trtitle01">[%$ST.enquirymain_add_tel%]</td>
						<td width="17%" class="trtitle02"><input type="text" id="contacterttel" name="contactertel" value="[%$contacter.Phone%]" size="18" class="infoInput" /></td>
						<td width="11%"  id="right" class="padding-left3">[%$ST.enquirymain_add_motel%]</td>
						<td width="12%" class="trtitle02"><input type="text" id="contacterphone" name="contacterphone" value="[%$contacter.Mobile%]" size="18" class="infoInput" /></td>
                        <td width="45%" class="trtitle02"></td>
					</tr>
					<tr class="trstyle2">
						<td width="15%" class="trtitle01">[%$ST.enquirymain_add_fax%]</td>
						<td width="17%" class="trtitle02"><input type="text" id="contacterfax" name="contacterfax" value="[%$contacter.Fax%]" size="18" class="infoInput" /></td>
						<td width="11%"  id="right" class="padding-left3">[%$ST.enquirymain_add_email%]</td>
						<td width="12%" class="trtitle02"><input type="text" id="contactermail" name="contactermail" value="[%$contacter.Email%]" size="18" class="infoInput" /></td>
                        <td width="45%" class="trtitle02"></td>
					</tr>
                    <tr class="trstyle2">
						<td width="15%" class="trtitle01">[%$ST.ordermain_text_idtypecode%]</td>
						<td width="17%" class="trtitle02"><input type="text" id="contacteridtypecode" name="contacteridtypecode" value="[%$contacter.IdTypeCode%]" size="10" class="infoInput" /></td>
						<td width="11%"  id="right" class="padding-left3">[%$ST.ordermain_text_idnumber%]</td>
						<td width="12%" class="trtitle02"><input type="text" id="contacteridnumber" name="contacteridnumber" value="[%$contacter.IdNumber%]" size="25" /></td>
                        <td width="45%" class="trtitle02"></td>
					</tr>
				</table>
            </div>
            <div class="sugtitle">
				<span class="sugtitleicon"><span class="strong colorgorning2">[%$ST.ordermain_text_hotelprice%]</span></span>
			</div>
			<div class="sugtitle-line"></div>
			<div class="formdiv">
            	<table border="0" width="100%">
					<tr class="trstyle2">
						<td width="15%" class="trtitle01">[%$ST.ordermain_text_hotelname%]</td>
						<td width="12%" class="trtitle02"><input type="text" id="hotelname" name="hotelname" value="[%$read.HotelName%]" size="30" class="infoInput" /><input type="hidden" id="hotelid" name="hotelid" value="[%$read.HotelId%]"></td>
						<td width="12%" id="right" class="padding-left3">[%$ST.ordermain_text_star%]</td>
						<td width="61%" class="trtitle02"><select size="1" name="hotelstar" class="select" id="hotelstar">
							<option value="0"[%if $read.HotelStar==0%] selected[%/if%]>[%$ST.ordermain_text_allstar%]</option>
                            <option value="1"[%if $read.HotelStar==1%] selected[%/if%]>[%$ST.ordermain_text_startype1%]</option> 
                            <option value="2"[%if $read.HotelStar==2%] selected[%/if%]>[%$ST.ordermain_text_startype2%]</option>
                            <option value="3"[%if $read.HotelStar==3%] selected[%/if%]>[%$ST.ordermain_text_startype3%]</option>
                            <option value="4"[%if $read.HotelStar==4%] selected[%/if%]>[%$ST.ordermain_text_startype4%]</option> 
						</select>
</td>
					</tr>
                    <tr class="trstyle2">
						<td width="15%" class="trtitle01">[%$ST.ordermain_text_city_option%]</td>
						<td width="12%" class="trtitle02"><select size="1" name="cityone" class="select" id="cityone" style="display:none;">
							<option value="0">[%$ST.ordermain_add_country_option%]</option>
							<option value="1" selected>[%$ST.ordermain_add_country_value%]</option>
						</select>
						<select size="1" name="citytwo" class="select" id="citytwo">
							<option value="0" selected>[%$ST.ordermain_add_province_option%]</option>
						</select>
</td>
						<td width="12%"  id="right" class="padding-left3">[%$ST.ordermain_text_district_option%]</td>
						<td width="61%" colspan="2" class="trtitle02"><select size="1" name="citythree" class="select" id="citythree">
							<option value="0" selected>[%$ST.ordermain_add_city_option%]</option>
						</select>
						<select size="1" name="district" class="select" id="district">
							<option value="0" selected>[%$ST.ordermain_add_district_option%]</option>
						</select>
						<span id="cityloading">Loading…</span>
</td>
					</tr>
					<tr class="trstyle2">
						<td width="15%" class="trtitle01">[%$ST.ordermain_add_hoteladdress%]</td>
						<td width="12%" class="trtitle02"><input type="text" id="hoteladdr" name="hoteladdr" value="[%$read.HotelAddr%]" size="40" class="infoInput" /></td>
						<td width="12%"  id="right" class="padding-left3">[%$ST.ordermain_add_hoteltel%]</td>
						<td width="61%" class="trtitle02"><input type="text" id="hotelphone" name="hotelphone" value="[%$read.HotelPhone%]" size="18" class="infoInput" /></td>
					</tr>
                    <tr class="trstyle2">
						<td width="15%" class="trtitle01">[%$ST.ordermain_text_roomtype2%]</td>
						<td width="12%" class="trtitle02">
                        <select size="1" name="roomtype" class="select" id="roomtype">
						[%forlist from=$roomarray key=i%]
                            <option [%if $roomarray[i].selected=='selected'%]selected="selected" [%/if%]value="1">[%$roomarray[i].name%]</option>
                         [%/forlist%]
						</select>
						</td>
						<td width="12%"  id="right" class="padding-left3">[%$ST.ordermain_text_hotelcompany%]</td>
						<td width="61%" class="trtitle02"> 
                        <select size="1" name="hotelincompany" class="select" id="hotelincompany">
							<option value="0">[%$ST.ordermain_text_selecttcomext%]</option>
                            [%forlist from=$companyarray key=i%]
                            <option [%if $companyarray[i].selected=='selected'%]selected="selected" [%/if%]value="[%$companyarray[i].companyid%]">[%$companyarray[i].companyname%]</option>
                            [%/forlist%]
                        </select> 
						</td>
					</tr>
                    <tr class="trstyle2">
						<td width="15%" class="trtitle01">[%$ST.ordermain_text_roomtypeinfo%]</td>
						<td width="85%" colspan="3" class="trtitle02"><textarea name="roomtypeinfo" id="roomtypeinfo" rows="2" cols="60" class="infoInput">[%$read.RoomTypeInfo%]</textarea>
						</td>
					</tr>
                    <tr class="trstyle2">
						<td width="15%" class="trtitle01">[%$ST.ordermain_text_arrivalearlytime%]</td>
						<td width="12%" class="trtitle02"><select style="width:120px;" name="arrivalearlytime" id="arrivalearlytime">
     <option value="09:00"[%if $read.ArrivalEarlyTime=='09:00'%] selected[%/if%]>9:00</option>
     <option value="10:00"[%if $read.ArrivalEarlyTime=='10:00'%] selected[%/if%]>10:00</option>
     <option value="11:00"[%if $read.ArrivalEarlyTime=='11:00'%] selected[%/if%]>11:00</option>
     <option value="12:00"[%if $read.ArrivalEarlyTime=='12:00'%] selected[%/if%]>12:00</option>
     <option value="13:00"[%if $read.ArrivalEarlyTime=='13:00'%] selected[%/if%]>13:00</option>
     <option value="14:00"[%if $read.ArrivalEarlyTime=='14:00'%] selected[%/if%]>14:00</option>
     <option value="15:00"[%if $read.ArrivalEarlyTime=='15:00'%] selected[%/if%]>15:00</option>
     <option value="16:00"[%if $read.ArrivalEarlyTime=='16:00'%] selected[%/if%]>16:00</option>
     <option value="17:00"[%if $read.ArrivalEarlyTime=='17:00'%] selected[%/if%]>17:00</option>
     <option value="18:00"[%if $read.ArrivalEarlyTime=='18:00'%] selected[%/if%]>18:00</option>
     <option value="19:00"[%if $read.ArrivalEarlyTime=='19:00'%] selected[%/if%]>19:00</option>
     <option value="20:00"[%if $read.ArrivalEarlyTime=='20:00'%] selected[%/if%]>20:00</option>
     <option value="21:00"[%if $read.ArrivalEarlyTime=='21:00'%] selected[%/if%]>21:00</option>
     <option value="22:00"[%if $read.ArrivalEarlyTime=='22:00'%] selected[%/if%]>22:00</option>
     <option value="23:00"[%if $read.ArrivalEarlyTime=='23:00'%] selected[%/if%]>23:00</option>
     <option value="23:59"[%if $read.ArrivalEarlyTime=='23:59'%] selected[%/if%]>23:59</option>
     <option value="02:00"[%if $read.ArrivalEarlyTime=='02:00'%] selected[%/if%]>[%$ST.select_time_1%]02:00</option>
     <option value="03:00"[%if $read.ArrivalEarlyTime=='03:00'%] selected[%/if%]>[%$ST.select_time_1%]03:00</option>
     <option value="04:00"[%if $read.ArrivalEarlyTime=='04:00'%] selected[%/if%]>[%$ST.select_time_1%]04:00</option>
     <option value="05:00"[%if $read.ArrivalEarlyTime=='05:00'%] selected[%/if%]>[%$ST.select_time_1%]05:00</option>
     <option value="06:00"[%if $read.ArrivalEarlyTime=='06:00'%] selected[%/if%]>[%$ST.select_time_1%]06:00</option>
</select></td>
						<td width="12%"  id="right" class="padding-left3">[%$ST.ordermain_text_arrivallatetime%]</td>
						<td width="61%" class="trtitle02"><select style="width:120px;" name="arrivallatetime" id="arrivallatetime">
     <option value="09:00"[%if $read.ArrivalLateTime=='09:00'%] selected[%/if%]>9:00</option>
     <option value="10:00"[%if $read.ArrivalLateTime=='10:00'%] selected[%/if%]>10:00</option>
     <option value="11:00"[%if $read.ArrivalLateTime=='11:00'%] selected[%/if%]>11:00</option>
     <option value="12:00"[%if $read.ArrivalLateTime=='12:00'%] selected[%/if%]>12:00</option>
     <option value="13:00"[%if $read.ArrivalLateTime=='13:00'%] selected[%/if%]>13:00</option>
     <option value="14:00"[%if $read.ArrivalLateTime=='14:00'%] selected[%/if%]>14:00</option>
     <option value="15:00"[%if $read.ArrivalLateTime=='15:00'%] selected[%/if%]>15:00</option>
     <option value="16:00"[%if $read.ArrivalLateTime=='16:00'%] selected[%/if%]>16:00</option>
     <option value="17:00"[%if $read.ArrivalLateTime=='17:00'%] selected[%/if%]>17:00</option>
     <option value="18:00"[%if $read.ArrivalLateTime=='18:00'%] selected[%/if%]>18:00</option>
     <option value="19:00"[%if $read.ArrivalLateTime=='19:00'%] selected[%/if%]>19:00</option>
     <option value="20:00"[%if $read.ArrivalLateTime=='20:00'%] selected[%/if%]>20:00</option>
     <option value="21:00"[%if $read.ArrivalLateTime=='21:00'%] selected[%/if%]>21:00</option>
     <option value="22:00"[%if $read.ArrivalLateTime=='22:00'%] selected[%/if%]>22:00</option>
     <option value="23:00"[%if $read.ArrivalLateTime=='23:00'%] selected[%/if%]>23:00</option>
     <option value="23:59"[%if $read.ArrivalLateTime=='23:59'%] selected[%/if%]>23:59</option>
     <option value="02:00"[%if $read.ArrivalLateTime=='02:00'%] selected[%/if%]>[%$ST.select_time_1%]02:00</option>
     <option value="03:00"[%if $read.ArrivalEarlyTime=='03:00'%] selected[%/if%]>[%$ST.select_time_1%]03:00</option>
     <option value="04:00"[%if $read.ArrivalLateTime=='04:00'%] selected[%/if%]>[%$ST.select_time_1%]04:00</option>
     <option value="05:00"[%if $read.ArrivalLateTime=='05:00'%] selected[%/if%]>[%$ST.select_time_1%]05:00</option>
     <option value="06:00"[%if $read.ArrivalLateTime=='06:00'%] selected[%/if%]>[%$ST.select_time_1%]06:00</option>
</select></td>
					</tr>
                    
                    <tr class="trstyle2">
						<td width="15%" class="trtitle01">[%$ST.ordermain_text_roomprice%]</td>
						<td width="12%" class="trtitle02"><input type="text" name="roomprice" id="roomprice" size="15" value="[%$read.RoomPrice%]" maxlength="50" class="infoInput"/>
</td>
						<td width="12%"  id="right" class="padding-left3">[%$ST.ordermain_text_roomamount%]</td>
						<td width="61%" class="trtitle02">
                        <select class="infoInput" name="roomamount" id="roomamount">
						     <option [%if $read.RoomAmount==1%]selected [%/if%]value="1">1</option>
						     <option [%if $read.RoomAmount==2%]selected [%/if%]value="2">2</option>
							 <option [%if $read.RoomAmount==3%]selected [%/if%]value="3">3</option>
							 <option [%if $read.RoomAmount==4%]selected [%/if%]value="4">4</option>
							 <option [%if $read.RoomAmount==5%]selected [%/if%]value="5">5</option>
		</select>

</td>
					</tr>
                    <tr class="trstyle2">
						<td width="15%" class="trtitle01">[%$ST.ordermain_text_checkguestamount%]</td>
						<td width="12%" class="trtitle02"><input type="text" id="guestamount" name="guestamount" value="[%$read.GuestAmount%]" size="10" class="infoInput" /></td>
						<td width="12%"  id="right" class="padding-left3">[%$ST.ordermain_text_totalamount%]</td>
						<td width="61%" class="trtitle02"><input type="text" id="totalprice" name="totalprice" value="[%$read.TotalPrice%]" size="10" class="infoInput" /></td>
					</tr>
                    <tr class="trstyle2">
						<td width="15%" class="trtitle01">[%$ST.ordermain_text_currencycode%]</td>
						<td width="12%" class="trtitle02"><select class="infoInput" name="currencycode" id="currencycode">
<option [%if $read.CurrencyCode=='HKD'%]selected [%/if%]value="HKD">[%$ST.select_pay_type1%]</option> 
<option [%if $read.CurrencyCode=='MOP'%]selected [%/if%]value="MOP">[%$ST.select_pay_type2%]</option> 
<option [%if $read.CurrencyCode=='RMB'%]selected [%/if%]value="RMB">[%$ST.select_pay_type3%]</option> 
<option [%if $read.CurrencyCode=='USD'%]selected [%/if%]value="USD">[%$ST.select_pay_type4%]</option> 
<option [%if $read.CurrencyCode=='SGD'%]selected [%/if%]value="SGD">[%$ST.select_pay_type5%]</option> 
</select>
                        </td>
						<td width="12%" id="right" class="padding-left3">订单确认方式</td>
						<td width="61%" class="trtitle02"><select class="infoInput" name="confirmtypecode" id="confirmtypecode">
<option [%if $read.ConfirmTypeCode=='sms'%]selected [%/if%]value="sms">短信确认</option> 
<option [%if $read.ConfirmTypeCode=='email'%]selected [%/if%]value="email">email确认</option>  
</select></td>
					</tr>
				</table>
            </div>
            <div class="sugtitle">
				<span class="sugtitleicon"><span class="strong colorgorning2">[%$ST.ordermain_text_creditcardinfo%]</span></span>
			</div>
			<div class="sugtitle-line"></div>
			<div class="formdiv">
            	<table border="0" width="100%">
					<tr class="trstyle2">
						<td width="15%" class="trtitle01">[%$ST.ordermain_text_creditcard%]</td>
						<td width="12%" class="trtitle02"><input type="text" id="creditcard" name="creditcard" value="[%$cardarr.Number%]" size="30" class="infoInput" /></td>
						<td width="6%" id="right" class="padding-left3">[%$ST.ordermain_text_veryfyvode%]</td>
						<td width="67%" class="trtitle02"><input type="text" id="veryfyvode" name="veryfyvode" value="[%$cardarr.VeryfyCode%]" size="10" class="infoInput" />
</td>
					</tr>
                    <tr class="trstyle2">
						<td width="15%" class="trtitle01">[%$ST.ordermain_text_validyear%]</td>
						<td width="12%" class="trtitle02"><input type="text" id="validyear" name="validyear" value="[%$cardarr.ValidYear%]" size="10" class="infoInput" />
</td>
						<td width="6%"  id="right" class="padding-left3">[%$ST.ordermain_text_validmonth%]</td>
						<td width="67%" class="trtitle02"><input type="text" id="validmonth" name="validmonth" value="[%$cardarr.ValidMonth%]" size="10" class="infoInput" />
</td>
					</tr>
                    <tr class="trstyle2">
						<td width="15%" class="trtitle01">[%$ST.ordermain_text_idtypecode%]</td>
						<td width="12%" class="trtitle02"><input type="text" id="idtypecode" name="idtypecode" value="[%$cardarr.IdTypeCode%]" size="10" class="infoInput" />
</td>
						<td width="6%"  id="right" class="padding-left3">[%$ST.ordermain_text_idnumber%]</td>
						<td width="67%" class="trtitle02"><input type="text" id="idnumber" name="idnumber" value="[%$cardarr.IdNumber%]" size="30" class="infoInput" />
</td>
					</tr>
                    <tr class="trstyle2">
						<td width="15%" class="trtitle01">[%$ST.ordermain_text_cardholdername%]</td>
						<td width="12%" class="trtitle02"><input type="text" id="cardholdername" name="cardholdername" value="[%$cardarr.CardHolderName%]" size="10" class="infoInput" /></td>
						<td width="6%"  class="trtitle02"></td>
						<td width="67%" class="trtitle02"></td>
					</tr>
				</table>
            </div>
            <div class="sugtitle">
				<span class="sugtitleicon"><span class="strong colorgorning2">[%$ST.ordermain_text_other%]</span></span>
			</div>
			<div class="sugtitle-line"></div>
			<div class="formdiv">
            <table border="0" width="100%">
                    <tr class="trstyle2">
						<td width="15%" class="trtitle01">[%$ST.ordermain_text_sms%]</td>
						<td width="85%" colspan="6" class="trtitle02"><textarea name="sms" id="sms" rows="4" cols="60" class="infoInput">[%$read.SMS%]</textarea></td>
					</tr>
                    <tr class="trstyle2">
						<td width="15%" class="trtitle01"></td>
						<td width="85%" colspan="6" class="trtitle02"><a class="setedit2" hidefocus="true" href="">[%$ST.enquirymain_text_printorder%]</a></td>
					</tr>
            </table>
            </div>
		</div>
	</div>
	<div id="downbotton">
		<div id="subbotton">
			<table border="0" width="100%">
				<tr id="bottonsubmit">
					<td align="center">
						<table border="0">
							<tr>
								<td class="padding-left5"><input type="submit" id="ordereditsubmit" name="Submit" disabled="disabled" value="[%$ST.botton_edit%]" class="buttonface" /></td>
								<td class="padding-left5"><input type="button" name="cancel" onClick="javascript:parent.onaletdoc();" value="[%$ST.botton_edit_reset%]" class="buttonface" /></td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</div>
	</div>
	<input type="hidden" name="id" value="[%$read.ID%]">
</form>
</div>
</body>

</html>